
import request from '@/utils/request';

export function listData(query) {
  return request({
    url: `/channel/channel_user_list`,
    method: 'get',
    params: query
  });
}

export function listData1(query) {
  return request({
    url: `/channel/channel_gift_list`,
    method: 'post',
    data: query
  });
}

export function listData2(query) {
  return request({
    url: `/channel/channel_online_time`,
    method: 'post',
    data: query
  });
}

export function listData3(query) {
  return request({
    url: `/channel/channel_user_list`,
    method: 'post',
    data: query
  });
}

export function listData4(query) {
  return request({
    url: `/channel/channel_user_list`,
    method: 'post',
    data: query
  });
}

export function saveData(form) {
  return request({
    url: '/nobility/add',
    method: 'post',
    data: form
  });
}

export function updateData(form) {
  return request({
    url: '/nobility/save',
    method: 'post',
    data: form
  });
}

export function deleteData(query) {
  return request({
    url: '/nobility/del',
    method: 'post',
    data: query
  });
}

export function getPrivateChat({user_id, user_code, nickname, content, perPage, page}) {
  /*
  * 获取私聊记录
  *
  * */
  return request({
    url: '/channel/chat/private',
    method: 'get',
    params: {user_code, user_id, nickname, content, perPage, page}
  })
}

export function getRoomChat({user_id, room_id, room_name, content, perPage, page}) {
  /*
  * 获取聊天室聊天记录
  * */
  return request({
    url: '/channel/chat/room',
    method: 'get',
    params: {user_id, room_id, room_name, content, perPage, page}
  })
}
